<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>jQuery EasyUI</title>
    <link rel="stylesheet" type="text/css" href="../themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="../themes/icon.css">
    <script type="text/javascript" src="../js/jquery-1.4.4.min.js"></script>
    <script type="text/javascript" src="../js/jquery.easyui.min.js"></script>
    <script>
        $(function () {
            $('#tt').datagrid({
                url: 'datagrid_data2.json',
                title: 'xxxxxx',
                width: 1150,
                height: 550,
                fitColumns: true,
                method: 'GET',
                pagination: true,
                idField:"id",
                columns: [[
                    {
                        field: 'ck',
                        checkbox: true,
                        width: 80
                    },
                    {
                        field: 'name',
                        title: '店铺名称',
                        width: 80
                    },
                    {
                        field: 'role',
                        title: '店铺地址',
                        width: 80
                    },
                    {
                        field: 'path',
                        title: '店铺特色',
                        width: 80
                    },
                    {
                        field: 'method',
                        title: '联系电话',
                        width: 80
                    },
                    {
                        field: 'property',
                        title: '操作',
                        width: 80,
                        formatter: function (value, rowData,
                            rowIndex) {
                            console.log(value);
                            console.log(rowData);
                            console.log(rowIndex);
                            return '<a href="javascript:void(0);" onClick="editLeaguer(' + rowData.id + ');">修改</a>   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     <a href="javascript:void(0);" onClick="destroyLeaguer(' + rowData.id + ');">删除</a>';
                        }
                    }

				]],
            });
        });
        function editLeaguer(rowDate){
         console.log(rowDate)   
        }
    </script>
</head>

<body>
    <div id="toolbar">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" plain="true" onClick="newLeaguer()">新建</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onClick="destroyLeaguer(null)">删除</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onClick="destroyLeaguer(null)">修改</a>
    </div>
    <table id="tt" toolbar="#toolbar">
    </table>

</body>

</html>